//
//  HDTextField.m
//  Carpooling
//
//  Created by haidong on 2016/10/28.
//  Copyright © 2016年 MagicBeans. All rights reserved.
//

#import "HDTextField.h"

@implementation HDTextField

- (CGRect)leftViewRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x + 2, bounds.origin.y + 2, bounds.size.width - 4, bounds.size.height - 4);
}

- (CGRect)rightViewRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x + 2, bounds.origin.y + 2, bounds.size.width - 4, bounds.size.height - 4);
}

- (CGRect)editingRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x + 5, bounds.origin.y, bounds.size.width - 5, bounds.size.height);
}

- (CGRect)textRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x + 5, bounds.origin.y, bounds.size.width - 5, bounds.size.height);
}

- (CGRect)placeholderRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x+10, bounds.origin.y, bounds.size.width -10, bounds.size.height);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
